package com.sc.study.sleeproom.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.sc.study.sleeproom.mapper.ScSleepRoomPersonTypeMapper;
import com.sc.study.sleeproom.domain.ScSleepRoomPersonType;
import com.sc.study.sleeproom.service.IScSleepRoomPersonTypeService;

/**
 * 寝室类型Service业务层处理
 * 
 * @author sc
 * @date 2022-03-14
 */
@Service
public class ScSleepRoomPersonTypeServiceImpl implements IScSleepRoomPersonTypeService 
{
    @Autowired
    private ScSleepRoomPersonTypeMapper scSleepRoomPersonTypeMapper;

    /**
     * 查询寝室类型
     * 
     * @param id 寝室类型主键
     * @return 寝室类型
     */
    @Override
    public ScSleepRoomPersonType selectScSleepRoomPersonTypeById(Long id)
    {
        return scSleepRoomPersonTypeMapper.selectScSleepRoomPersonTypeById(id);
    }

    /**
     * 查询寝室类型列表
     * 
     * @param scSleepRoomPersonType 寝室类型
     * @return 寝室类型
     */
    @Override
    public List<ScSleepRoomPersonType> selectScSleepRoomPersonTypeList(ScSleepRoomPersonType scSleepRoomPersonType)
    {
        return scSleepRoomPersonTypeMapper.selectScSleepRoomPersonTypeList(scSleepRoomPersonType);
    }

    /**
     * 新增寝室类型
     * 
     * @param scSleepRoomPersonType 寝室类型
     * @return 结果
     */
    @Override
    public int insertScSleepRoomPersonType(ScSleepRoomPersonType scSleepRoomPersonType)
    {
        return scSleepRoomPersonTypeMapper.insertScSleepRoomPersonType(scSleepRoomPersonType);
    }

    /**
     * 修改寝室类型
     * 
     * @param scSleepRoomPersonType 寝室类型
     * @return 结果
     */
    @Override
    public int updateScSleepRoomPersonType(ScSleepRoomPersonType scSleepRoomPersonType)
    {
        return scSleepRoomPersonTypeMapper.updateScSleepRoomPersonType(scSleepRoomPersonType);
    }

    /**
     * 批量删除寝室类型
     * 
     * @param ids 需要删除的寝室类型主键
     * @return 结果
     */
    @Override
    public int deleteScSleepRoomPersonTypeByIds(Long[] ids)
    {
        return scSleepRoomPersonTypeMapper.deleteScSleepRoomPersonTypeByIds(ids);
    }

    /**
     * 删除寝室类型信息
     * 
     * @param id 寝室类型主键
     * @return 结果
     */
    @Override
    public int deleteScSleepRoomPersonTypeById(Long id)
    {
        return scSleepRoomPersonTypeMapper.deleteScSleepRoomPersonTypeById(id);
    }
}
